import java.awt.Graphics;


public class WallTile extends Tile implements Drawable, Comparable{

	private Animation animation;
	private int x, y;
	
	public WallTile(){
		empty = false;
		animation = null;
	}
	
	public WallTile(Animation animation, int x, int y) {
		empty = false;
		this.animation = animation;
		this.x = x;
		this.y = y;
		
	}
	
	public int compareTo(Object o){
		if (o instanceof Person){
			return y - ((Person)o).getY();
		} else if (o instanceof WallTile){
			return y - ((WallTile)o).getY();
		} else return 0;
	}
	
	@Override
	public void draw(Graphics g) {
		if (animation != null){
			g.drawImage(animation.getCurrentFrame().getImage(), x*OurApplet.TILE_SIZE, y*OurApplet.TILE_SIZE-OurApplet.TILE_SIZE, null);
		}
		
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}
}
